package com.qf.service.impl;

import com.qf.dao.BtypeRepository;
import com.qf.pojo.resp.BaseResp;
import com.qf.pojo.vo.Address;
import com.qf.pojo.vo.Btype;
import com.qf.service.BTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BTypeServiceImpl implements BTypeService {
    @Autowired
    BtypeRepository btypeRepository;

    @Override
    public BaseResp findAll() {
        BaseResp baseResp = new BaseResp();
        List<Btype> all = btypeRepository.findAll();
        if(all!=null){
            baseResp.setData(all);
            baseResp.setCode(200);
            return baseResp;
        }
        baseResp.setCode(2001);
        return baseResp;
    }
}
